package org.demo.vo.daomapping;

import org.demo.vo.bean.Author;
import org.telosys.persistence.mapping.AttributeMapping;
import org.telosys.persistence.mapping.EntityMapping;

public class AuthorMapping extends EntityMapping<Author>
{
	private final static Class<Author> entityClass = Author.class ;

	private final static String   table   = "AUTHOR" ;

	private final static String   schema  = null ;  // Can be null if not required by the database
	
	private final static AttributeMapping[] attributesMapping = new AttributeMapping[]
	{
		new AttributeMapping("id",        "ID",          PRIMARY_KEY,  GENERATED_VALUE, 0 ),
		new AttributeMapping("firstName", "FIRST_NAME",  NOT_PK,       NOT_GENERATED,   0 ),
		new AttributeMapping("lastName",  "LAST_NAME",   NOT_PK,       NOT_GENERATED,   0 )
	};
	
	public AuthorMapping() 
	{
		super(entityClass, table, schema, attributesMapping, null, null );
	}
	
}
